export default {
    namespaced: true,
    state: {
      isShowtoast: false,
      toastMsg:'',
      toastType:''
    },
    getters: {},
    mutations: {
      changeIsisShowtoast(state, payload) {
        // console.log(200, payload);
        state.isShowtoast = payload.isShow;
        if(payload.isShow){
            state.toastMsg=payload.msg;
            state.toastType=payload.type
        }
      },
    },
    actions:{
      asyncIsshowToast(context,payload){
        context.commit('changeIsisShowtoast',{
          isShow:true,
          msg:payload.msg,
          type:payload.type
        })
        setTimeout(()=>{
          context.commit('changeIsisShowtoast',{
            isShow:false,
          })
        },1500)
      }
    }
  };
  